package com.neusoft.elmboot1.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.neusoft.elmboot1.po.User;
import com.neusoft.elmboot1.service.IUserService;

@RestController     // 复合注解 @ResponseBody+@Controller
@CrossOrigin
@RequestMapping("/UserController")
public class UserController {
	@Autowired    //DI
	IUserService  userService;
	
	
	@RequestMapping("/getUserByIdByPass")
	public User getUserByIdByPass(@RequestBody User  u) {
		System.out.println(u);
		User login = userService.login(u);
		return login;
	}
	
}
